<?php

namespace App\Http\Forms;

use Kris\LaravelFormBuilder\Form;

class MemberForm extends Form
{
    public function buildForm()
    {
        $this
            ->add('user_id', 'select', [
                'attr' => ['class' => "form-control select2"],
                'label' => "用户",
                'rules' => 'nullable|integer',
                'choices' => [],
            ])
            ->add('quota', 'text', [
                'label' => "奖金池",
                'rules' => 'required|integer|min:0|max:9999999',
                'choices' => [],
            ])
            ->add('rebate', 'text', [
                'label' => "已解锁奖金",
                'rules' => 'required|integer|min:0|max:9999999',
                'default_value' => 0,
            ])
            ->add('submit', 'submit', [
                'attr' => ['class' => "form-control btn btn-success"],
                'label' => '保存',
            ]);
    }
}
